﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="LoginForm.ascx.cs" Inherits="CMS_LoginForm" %>
<div>
    <div style="border-bottom: 1px solid #cccccc; line-height: 50px;">
        <img src="images/group_key.jpg" />
        <strong style="font-size: 25px">
            <asp:Literal ID="LoginStatus" runat="server"></asp:Literal>
        </strong>
    </div>
    <div runat="server" id="LoginForm">
        <p>
            <asp:Literal ID="litName" runat="server"></asp:Literal>，您好！
        </p>
        <p>
            当前时间：
            <br />
            <span id="clock" style="color: Red"></span>
        </p>
        <p style="text-align: center">
            <table style="width:100%">
                <tr style="text-align:right">
                    <td style="width:200px;text-align:right">
                        <asp:LinkButton ID="LinkButton1" runat="server" OnClientClick="location.href='../WebUPWDControl.aspx';return false;">修改密码</asp:LinkButton>
                    </td>
                  <td style="width:80px;text-align:right">
                        <asp:LinkButton ID="logout" runat="server" OnClick="logout_Click"
                            OnClientClick="location.href='../InfoLogin.aspx';return false;">注销</asp:LinkButton>
                    </td>
                </tr>
            </table>
        </p>
    </div>
    <br />

    <script language="JavaScript">
        var timerID = null;
        var timerRunning = false;

        function stopclock() {
            if (timerRunning)
                clearTimeout(timerID);
            timerRunning = false;
        }
        function startclock() {
            stopclock();
            showtime();
        }
        function showtime() {
            var now = new Date();
            var hours = now.getHours();
            var minutes = now.getMinutes();
            var seconds = now.getSeconds()
            var timeValue = now.getYear() + "年" + (now.getMonth() + 1) + "月" + now.getDate() + "日" + ((hours >= 12) ? " 下午 " : " 上午 ")
            timeValue += ((hours > 12) ? hours - 12 : hours)
            timeValue += ((minutes < 10) ? ":0" : ":") + minutes
            timeValue += ((seconds < 10) ? ":0" : ":") + seconds
            document.getElementById("clock").innerHTML = timeValue;
            //document.clock.thetime.value = timeValue;
            timerID = setTimeout("showtime()", 1000);
            timerRunning = true;
        }
        showtime();
    </script>

</div>
